﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AyuBookmark.Common.Models;

namespace AyuBookmark.Common.Interfaces
{
    /// <summary>
    /// 通知仓储接口
    /// </summary>
    public interface INotificationRepository
    {
        Task<Notification> GetByIdAsync(int id);
        Task AddAsync(Notification notification);
        Task UpdateAsync(Notification notification);
        Task<IEnumerable<Notification>> FindAsync(Func<Notification, bool> predicate);
        Task<PaginatedResult<Notification>> GetPagedAsync(
            Func<Notification, bool> predicate,
            int pageIndex,
            int pageSize,
            Func<Notification, object> orderBy,
            bool isDescending = true);
    }
}